import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
  BaseEntity,
  CreateDateColumn,
  ManyToOne,
  JoinColumn,
} from 'typeorm';
import { IconGroupList } from './iconGroup-list.entity';

@Entity()
export class IconList extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', name: 'iconName' })
  iconName: string;

  @Column({ type: 'longtext', name: 'svgString' })
  svgString: string;

  @ManyToOne(() => IconGroupList, (iconGroupList) => iconGroupList.iconList)
  @JoinColumn()
  iconGroup: IconGroupList;

  @CreateDateColumn({ type: 'timestamp' })
  createTime: Date;
}

// export class IconList {}
